namespace SovaWebService.ViewModels
{
    public class PaginableVM
    {
        public string CurrentPageUrl { get; set; }
        public string FirstPageUrl { get; set; }
        public string PreviousPageUrl { get; set; }
        public string NextPageUrl { get; set; }
        public string LastPageUrl { get; set; }

        // Overloading the + operator
        public static PaginableVM operator +(PaginableVM a, object b)
        {
            var propInfo = b.GetType().GetProperties();
            foreach (var item in propInfo)
            {
                a.GetType().GetProperty(item.Name).SetValue(a, item.GetValue(b, null), null);
            }
            return a;
        }
    }
}